//
//  LJPPhotoCollectionViewCell.m
//  NineGroupProject
//
//  Created by dllo on 16/1/5.
//  Copyright © 2016年 lushan. All rights reserved.
//

#import "LJPPhotoCollectionViewCell.h"
#import "UIImageView+WebCache.h"
@implementation LJPPhotoCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.photoImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        [self.contentView addSubview:self.photoImageView];
        
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    // 大图片
    self.photoImageView.frame = CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height);
}
-(void)setPhoto:(LJPPhoto *)photo
{

    _photo = photo;
    [self.photoImageView sd_setImageWithURL:[NSURL URLWithString:photo.image_url] placeholderImage:[UIImage imageNamed:@"loading.jpg"]];
    
}

@end
